package com.woniuxy.food.infra.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.woniuxy.food.infra.model.FoodSpu;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 菜品spu表 Mapper 接口
 * </p>
 *
 * @author 刘德华
 * @since 2023-07-19
 */
@Mapper
public interface FoodSpuMapper extends BaseMapper<FoodSpu> {
    Page<FoodSpu> searchFoodSpuByConditionAsc(Page<FoodSpu> page,@Param("storeId") Integer storeId,@Param("foodTypeId") Integer foodTypeId,@Param("keyword") String keyword,@Param("spuState")String spuState);

    Page<FoodSpu> searchFoodSpuByConditionDesc(Page<FoodSpu> page,@Param("storeId") Integer storeId,@Param("foodTypeId") Integer foodTypeId,@Param("keyword") String keyword,@Param("spuState")String spuState);

    Page<FoodSpu> searchFoodSpuByConditionAscNoTypeId(Page<FoodSpu> page,@Param("storeId") Integer storeId,@Param("keyword") String keyword,@Param("spuState")String spuState);

    Page<FoodSpu> searchFoodSpuByConditionDescNoTypeId(Page<FoodSpu> page,@Param("storeId") Integer storeId,@Param("keyword") String keyword,@Param("spuState")String spuState);
}
